
<template >
  <div class="content" v-show="shuaxin">
      <!-- 财务管理 晓霞 -->
      <div class="title">
        <span></span>
        <span>财务管理</span>
      </div>
      <Search @searhParent="searhParent" />
      <AccDate :arr="arr" @resetparentFun="getData" />
      <Pages :total="total" :pageSize="pageSize"/>
  </div>
  
</template>

<script>
import Search from './components/Search.vue'
import AccDate from './components/AccDate.vue'
import Pages from './components/Pages.vue'
import {getAccount}  from '../../api/account/account'
export default {
 
components:{
 Search,
 AccDate,
 Pages
},
data(){
  return{
    shuaxin:true,
    arr:[],
    page:1,
    pageSize:9,
    total:0,
    search:''
  }
},
mounted(){
  this.getData()
},
methods:{
  searhParent(val){
    this.search = val
    this.getData()
  },
  fu(val){
    this.search = ''
    this.getData()
  },
  getData(){
    const params={
      search:this.search,
      page:this.page,
      pageSize:this.pageSize
      
    }
    console.log(params.pageSize);
  getAccount(params).then(res=>{
    console.log(res);
    if(res.code == 200){
      this.arr = res.data
      this.total = res.total
      
    }
  })
  }
}
}
</script>

<style lang="less" scoped>
.content{
  padding: 18px 10px;
}

.title{
margin-bottom: 20px ;
  span:nth-of-type(1){
    width: 5px;
    height: 20px;
    background-color: #438afe;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
    
  }
  span:nth-of-type(2){
   
   font-size: 18px;
   color:  #333;
   vertical-align: middle;
    
  }
}
</style>